<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Commodity;
use App\Models\CommoditySeries;

class CommoditySeriesController extends Controller
{
   public function list(Request $request)
   {
     $commodity_id = $request->commodity_id;
     $commodity = Commodity::find($commodity_id);
     $data = $commodity->CommoditySeries()->paginate(10)->toArray();
     return $data;
   }
}
